package io.renren.service.xtd.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import io.renren.dao.xtd.DataAchievementDaoXtd;
import io.renren.entity.xtd.DataAchievementEntityXtd;
import io.renren.service.xtd.DataAchievementServiceXtd;
import io.renren.service.impl.DataAchievementServiceImpl;


@Service("dataAchievementServiceXtd")
public class DataAchievementServiceImplXtd extends DataAchievementServiceImpl implements DataAchievementServiceXtd {
	@Autowired
	private DataAchievementDaoXtd dataAchievementDaoXtd;

	@Override
	public void saveXtd(DataAchievementEntityXtd dataAchievementEntityXtd) {
		// TODO Auto-generated method stub
		dataAchievementDaoXtd.saveXtd(dataAchievementEntityXtd);
	}

	@Override
	public List<DataAchievementEntityXtd> queryAllListXtd(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return dataAchievementDaoXtd.queryAllListXtd();
	}
	
	public DataAchievementEntityXtd querySingleXtd(String id) {
		// TODO Auto-generated method stub
		return dataAchievementDaoXtd.querySingleXtd(id);
	}
	
	public BigDecimal queryReceivableXtd(String upWorkNo) {
		// TODO Auto-generated method stub
		BigDecimal z = dataAchievementDaoXtd.queryReceivableXtd(upWorkNo);
		if(z!=null) {			
			return z;
		}else {
			BigDecimal s=new BigDecimal(0);
			return s;
		}
	}
	
	public BigDecimal queryPaidXtd(String upWorkNo) {
		// TODO Auto-generated method stub
		BigDecimal z = dataAchievementDaoXtd.queryPaidXtd(upWorkNo);
		if(z!=null) {			
			return z;
		}else {
			BigDecimal s=new BigDecimal(0);
			return s;
		}
		
	}
}
